---
layout: default
---
{% include header.html %}
<div class="recent">
    <div class="recent-posts-head">
        <p>最新文章</p>
        <div class="search-box">
            <input type="text" id="search_box" placeholder="Enter to search">
            <!-- <ul class="search-result" id="search_results"></ul> -->
        </div>
    </div>
    <ul class="recent-posts">
        {% for post in paginator.posts %}
        <li>
            {{post.date | date: '%F'}} -
            <a href="{{ post.url | prepend: site.baseurl }}" class="title">{{post.title}}</a>
        </li>
        {% endfor %}
    </ul>
</div>
<!-- <script src="{{ site.url }}/js/jekyll-search.min.js"></script>
<script type="text/javascript">
    SimpleJekyllSearch({
        searchInput: document.getElementById('search_box'),
        resultsContainer: document.getElementById('search_results'),
        json: '{{ site.baseurl }}/search_data.json',
        searchResultTemplate: '<li><a href="{url}" title="{desc}">{title}</a></li>',
        noResultsText: '<li>No results found</li>',
        limit: 7,
        fuzzy: false,
    });
</script> -->
<script type="text/javascript">
    document.getElementById("search_box").onkeypress = function (e) {
        if (e.keyCode === 13 && e.target.value) {
            window.open("https://google.com/search?q=site:tomoya92.github.io " + e.target.value, "_blank");
        }
    }
</script>